#ifndef CXX_Dispatch_H
#define CXX_Dispatch_H

#include <ntifs.h>
#include "ProcessCore.h"
#include "ProcessModule.h"
#include "ProcessThread.h"
#include "ProcessHandle.h"
#include "ProcessWindow.h"
#include "ProcessMemory.h"
#include "DriverCore.h"
#include "SystemCallback.h"
#include "FilterDriver.h"
#include "IoTimer.h"
#include "DpcTimer.h"
#include "Ssdt.h"
#include "Sssdt.h"
#include "FileCore.h"

// Method_Neither
/*
#define CTL_CODE( DeviceType, Function, Method, Access ) (                 \
((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
*/

#define FILE_DEVICE_ARKPROTECT           0x8005

	//
	// Process
	//

#define IOCTL_ARKPROTECT_PROCESSNUM        (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x801, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_ENUMPROCESS       (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x802, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_ENUMPROCESSMODULE (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x803, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_ENUMPROCESSTHREAD (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x804, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_ENUMPROCESSHANDLE (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x805, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_ENUMPROCESSWINDOW (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x806, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_ENUMPROCESSMEMORY (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x807, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_TERMINATEPROCESS  (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x808, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)

	//
	// Driver
	//

#define IOCTL_ARKPROTECT_ENUMDRIVER        (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x811, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_UNLOADRIVER       (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x812, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)

	//
	// Kernel
	//
#define IOCTL_ARKPROTECT_ENUMSYSCALLBACK   (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x821, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_ENUMFILTERDRIVER  (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x822, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_ENUMIOTIMER       (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x823, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_ENUMDPCTIMER      (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x824, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)

	//
	// Hook
	//
#define IOCTL_ARKPROTECT_ENUMSSDTHOOK      (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x831, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_RESUMESSDTHOOK    (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x832, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_ENUMSSSDTHOOK     (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x833, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_ARKPROTECT_RESUMESSSDTHOOK   (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x834, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
	
	//
	// File
	//
#define IOCTL_ARKPROTECT_DELETEFILE        (UINT32)CTL_CODE(FILE_DEVICE_ARKPROTECT, 0x841, METHOD_NEITHER, FILE_READ_ACCESS | FILE_WRITE_ACCESS)

NTSTATUS
APIoControlPassThrough(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);

#endif // !CXX_Dispatch_H